﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class manager_index : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["username"] == null)
        {
            Response.Redirect("login.aspx");
        }
        else
        {
            lbl_User.Text = Session["username"].ToString();
        }
        if (!IsPostBack)
        {
            createMenu();
        }
    }

    protected void btnLogOut_Click(object sender, EventArgs e)
    {
        Session.Clear();
        Response.Redirect("login.aspx");
    }

    public void createMenu()
    {
        lb_user.Attributes.Add("class", "itemList");
        lb_user.Attributes.Add("href", "user.aspx");
        lb_user.Attributes.Add("target", "content");

        lb_candidate.Attributes.Add("class", "itemList");
        lb_candidate.Attributes.Add("href", "candidate.aspx");
        lb_candidate.Attributes.Add("target", "content");

        lb_exam.Attributes.Add("class", "itemList");
        lb_exam.Attributes.Add("href", "exam.aspx");
        lb_exam.Attributes.Add("target", "content");

        lb_questions.Attributes.Add("class", "itemList");
        lb_questions.Attributes.Add("href", "questions.aspx");
        lb_questions.Attributes.Add("target", "content");

        lb_testresultes.Attributes.Add("class", "itemList");
        lb_testresultes.Attributes.Add("href", "test.aspx");
        lb_testresultes.Attributes.Add("target", "content");
    }
}
